package configor

import (
	"github.com/jinzhu/configor"
	"hy_808/global"
	"os"
	"path/filepath"
)

var ConfigGlobal global.ConfigTpl

func init() {
	// Conf support YAML, JSON, TOML, Shell Environment
	ex, err := os.Executable()
	if err != nil {
		panic(err)
	}
	exPath := filepath.Dir(ex)
	if err = configor.Load(&ConfigGlobal, exPath+"/config.yaml"); err != nil {
		panic(err)
	}
}
